package com.group7.mall.service;


import com.group7.mall.req.MessagePageRequest;
import com.group7.mall.dto.MessagePreviewDto;
import com.group7.mall.entity.TbMessage;
import com.group7.mall.entity.TbUser;

import java.util.List;

public interface MessageService {

    Integer messageToRead(TbMessage tbMessage);

    List<TbMessage> queryMessageByTwoUser(MessagePageRequest messagePageRequest);

    int clearMessageInDatabase();

    List<MessagePreviewDto> queryLatestMessagesByUserId(String userOpenId);

    Integer getAllUnreadMessage(TbUser tbUser);
}
